<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head th:replace="top::html"/>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<title>专家参会情况</title>
<body class="fixed hold-transition skin-blue">
	<div class="wrapper">
	
	    <div th:replace="tophtml::html" ></div>
	  	<div th:replace="left::html" ></div>

		<!-- 右边部分 -->
		<div class="content-wrapper">
			<section class="content-header">
				<h1>
					专家参会情况 <small></small>
				</h1>
				<ol class="breadcrumb">
					<li><a href="/index"><i class="fa fa-dashboard"></i>用户中心</a></li>
					<li><a href="/person/findPersonList">专家管理</a></li>
					<li><a th:href="@{/person/mateConference(pid=${person.pid})}">专家参会情况</a></li>
				</ol>
			</section>

			<!-- 列表展示 -->
			<section class="content container-fluid">

				<form class="form-inline" th:action="@{/person/mateConference}" method="get" id="from1">
					<input type="hidden" name="pageNo" id="pageNo" th:value="${pageInfo.pageNum}" />
					<input type="hidden" name="pid" th:value="${person.pid}" />
					
					<div class="form-group">
						<label style="margin-left: 1px;">所属领域</label> 
						<span th:each="rfd : ${researchFieldDictiontryList}"> 
							<label style="font-weight: lighter;">
								<input type="checkbox" name="researchField" th:value="${rfd.names}"
								   	   th:text="${rfd.worth}" style="margin-left: 1px;"
								       th:checked="${researchFieldArr != null ? #arrays.contains(researchFieldArr, rfd.names) : false}">
							</label>
						</span>
						<span style="margin-left: 10px; color: red;">(可以多选)</span>
					</div>
					<br/>
					<div class="form-group">
						<label style="margin-left: 1px;">活动名称</label> 
						<input type="text" class="form-control" name="conferenceName" th:value="${conference.conferenceName}" style="width: 202px;">
					</div>
					<div class="form-group">
						<label style="margin-left: 1px;">活动Id</label> 
						<input type="text" class="form-control"
							   th:if="${conference.conferenceNumber==null}"
							   name="conferenceNumberId" style="width: 202px;"
							   th:value="${conference.conferenceNumber}"> 
						<input type="text" class="form-control"
							   th:if="${conference.conferenceNumber!=null}"
							   name="conferenceNumberId"  style="width: 202px;"
							   th:value="'A'+${conference.conferenceNumber}">
					</div><br/>
					<div class="form-group">
						<label style="margin-left: 29px;">时间</label>
						<div class="input-group date">
							<div class="input-group-addon">
								<i class="fa fa-calendar"></i>
							</div>
							<input type="text" class="form-control pull-right" style="width: 164px;"
								   id="datepicker" name="beginDateTime1"
								   th:value="${conference.beginDateTime1}">
						</div>
					</div>
					<span  style="margin-left: 15px;">—</span>
					<div class="form-group">
						<div class="input-group date"  style="margin-left: 15px;">
							<div class="input-group-addon">
								<i class="fa fa-calendar"></i>
							</div>
						    <input type="text" class="form-control pull-right" style="width: 164px;"
								   id="datepicker3" name="beginDateTime2"
								   th:value="${conference.beginDateTime2}">
						</div>
					</div>
					<button type="submit" class="btn btn-primary" style="margin-left: 40px;">搜索</button>
					<button type="reset" style="margin-left: 40px;" class="btn btn-primary">重置</button>
					<input type="button" class="btn btn-primary" value="返回" onclick="window.history.go(-1)" style="margin-left: 40px;">
					<br/>
					<div>
						<span class="from-group"> 
							<label style="margin-left: 1px;">所属地区</label>
							<label style="font-weight: lighter;"> 
								<input type="radio" name="domesticOrForeign" id="optionsRadios1" value="0" style="margin-left: 1px;" 
								   	   th:checked="${conference != null ? conference.domesticOrForeign == 0 : false}">国内 
							</label>	   
							<label style="font-weight: lighter;">
								<input type="radio" name="domesticOrForeign" id="optionsRadios2" value="1" style="margin-left: 15px;" 
								       th:checked="${conference != null ? conference.domesticOrForeign == 1 : false}">国外
							</label>	   
						</span>
						<span class="form-group form-country"> 
							<label style="margin-left: 115.3px;">国家</label>
							<select class="form-area" style="width: 202px;height: 33px;border-color: silver;">
								<option value="-1">--选择国家--</option>
								<option th:each="list:${countryDictiontryList}"
										th:value="${list.pid}" th:text="${list.worth}"
										th:selected="${list.pid eq country}"></option>
							</select>
						</span><br/>
						<span class="form-group form-area"> 
							<label style="margin-left: 42px;">省</label>
							<select class="form-control form-area" id="provinceId" style="width: 202px;">
								<option th:value="-1">--选择省--</option>
								<option th:each="list:${provinceDictiontryList}"
									    th:selected="${list.names eq province}"
									    th:value="${list.names}" th:text="${list.worth}">
								</option>
							</select>
						</span> 
						<span class="form-group form-area">
							<label style="margin-left: 29px;">市</label> 
							<select class="form-control form-area" id="cityId" style="width: 202px;">
								<option th:value="-1">--选择市--</option>
								<option th:each="cityList:${cityDictiontryList}"
									    th:selected="${cityList.names eq city}"
									    th:value="${cityList.names}" th:text="${cityList.worth}">--选择市--
								</option>
							</select>
						</span> 
						<span class="form-group form-area">
							<label style="margin-left: 29px;">区</label> 
							<select class="form-control form-area" id="areaId" style="width: 202px;">
								<option th:value="-1">--选择区--</option>
								<option th:each="arealist:${areaDictiontryList}"
										th:selected="${arealist.names eq district}"
										th:value="${arealist.names}" th:text="${arealist.worth}">--选择区--
								</option>
							</select>
						</span> 
					</div>
				</form>

				<div class="box">
					<!-- /.box-header -->
					<div class="box-body">
						<table class="table table-bordered">
							<tbody>
								<tr>
									<th>活动Id</th>
									<th>活动名称</th>
									<th>开始时间</th>
								    <th>结束时间</th>
									<th>所属领域</th>
									<th>所在地区</th>
								</tr>
								<tr th:each="conference,conferenceIndex : ${pageInfo.list}">
									<td title="查看会议详情">
                                        <a th:href="@{'/conference/showDetail?conferenceId='+${conference.pid}}" th:text="'A'+${conference.conferenceNumber}"></a>
                                    </td>
									<!-- 活动名称 -->
									<td>
										<div class="col-md-4" style="width:100%;font-size: 14px;">
									    	<div class="box box-default collapsed-box" style="border-top:0px solid #d2d6de;">
										    	<div class="box-header with-border" th:if="${conference.conferenceName != null}">
											    	<span th:if="${#strings.length(conference.conferenceName) > 15}">
											        	<a th:href="${conference.conferenceWebSite}" th:text="${#strings.substring(conference.conferenceName,0,15)+'...'}" target="_blank"></a>
											        </span>
											        <span th:unless="${#strings.length(conference.conferenceName) > 15}">
											        	<a th:href="${conference.conferenceWebSite}" th:text="${conference.conferenceName}" target="_blank"></a>
											        </span>
											        <div class="box-tools pull-right" th:if="${#strings.length(conference.conferenceName) > 15}">
											        	<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
											        </div>
										       	</div>
										        <div class="box-body" style="display: none;">
										            <a th:href="${conference.conferenceWebSite}" th:text="${conference.conferenceName}" target="_blank"></a>
										        </div>
									    	</div>
								        </div>
                					</td>
									<td th:text="${conference.conferenceDateTime}"></td>
									<td th:text="${conference.conferenceBeginTime}"></td>
									<!-- 所属领域 -->
									<td>
										<div class="col-md-4" style="width:100%;font-size: 14px;">
									    	<div class="box box-default collapsed-box" style="border-top:0px solid #d2d6de;">
										    	<div class="box-header with-border" th:if="${conference.researchFieldNameStr != null}">
											    	<span th:if="${#strings.length(conference.researchFieldNameStr) > 15}">
											        	<span th:text="${#strings.substring(conference.researchFieldNameStr,0,15)+'...'}"></span>
											        </span>
											        <span th:unless="${#strings.length(conference.researchFieldNameStr) > 15}">
											        	<span th:text="${conference.researchFieldNameStr}"></span>
											        </span>
											        <div class="box-tools pull-right" th:if="${#strings.length(conference.researchFieldNameStr) > 15}">
											        	<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
											        </div>
										       	</div>
										        <div class="box-body" style="display: none;">
										            <span th:text="${conference.researchFieldNameStr}"></span>
										        </div>
									    	</div>
								        </div>
									</td>
									<td th:attr="title=${conference.areaNameStr}" th:text="${conference.areaNameArray}"></td>
								</tr>
							</tbody>
						</table>
					</div>
					<!-- 分页 -->
					<div th:replace="page::html"></div>
				</div>
			</section>
		</div>

		<div th:replace="footer::html" ></div>
		<div class="control-sidebar-bg"></div>
	</div>
	
	<!-- 引入js -->
	<div th:replace="bottom::html" ></div>
	<script src="/js/formValid.js"></script>
</body>
</html>